<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <script src="/jquer.js"></script>
    <title>Document</title>
    <style>
        * {
            padding: 0;
            margin: 0;
            background: #fff;
        }
        
        .main {
            width: 100%;
            height: 100%;
        }
        
        .title {
            font-size: 30px;
            color: white;
            width: 100%;
            height: 100px;
            text-align: center;
            line-height: 100px;
            background: gray;
        }
        
        .download {
            width: 245px;
            height: 245px;
            background: url('/文件.png');
            background-size: 100% 100%;
            margin: 0 auto;
            margin-top: 100px;
        }
        
        .btn {
            height: 80px;
            width: 400px;
            margin: 0 auto;
            margin-left: 1000px;
        }
        
        .text {
            border-radius: 10px;
            display: inline-block;
            width: 160px;
            line-height: 40px;
            height: 40px;
            font-size: 20px;
            font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif;
            font-weight: 600;
            cursor: pointer;
            /* background: white; */
        }
    </style>
</head>

<body>
    <div class="main">
        <h1 class="title">讯谷无纸化文件系统</h1>
        <div class="download"></div>
        <div class="btn">
            <button class="text" id="btn">下载文件</button>
        </div>
    </div>
</body>
<script>
    var btn = document.querySelector("#btn")
    btn.onclick = function() {
        alert(2222)
        var token = "eyJhbGciOiJIUzI1NiJ9.eyJjcmVhdGVUaW1lIjoxNjQwMTM5MzM4ODIyLCJ1c2VyVHlwZSI6ImFwaSIsInVzZXJOYW1lIjoi5paH5Lu2566h55CG57O757ufIiwidXNlcklkIjo3LCJpYXQiOjE2NDAxMzkzMzh9.7dqnru7xdughpv2G_MGB4pzh9PBbWk6UM1Xqvxlk8Ks";
        $.ajax({
                type: 'GET',
                async: false,
                headers: {
                    token:token
                },
                dataType: "text",
                url: 'http://192.168.32.100/paperless/file/download?typeld='+[[${typeld}]]+'&fileType=9',
                success: function(){
                alert(11111)
                }
        })
    }
</script>

</html>